CREATE TABLE cmsLocation
(
	LocationId int Primary Key NOT NULL Identity(1,1),
	LocationCode nvarchar(128),
	Location nvarchar(256),
	Description nvarchar(max),
	CreatedDate datetime,
	CreatedById int,
	LastSaveDate datetime,
	LastModifiedId int,
	ParentId int,
	OrderId int
)
go
CREATE TABLE cmsProductLocation
(
	ProductLoctionId int Primary key not null identity(1,1),
	ProductCode nvarchar(250) NOT NULL,
	LocationCode nvarchar(128) NOT NULL,
	OrderId int
)

GO

CREATE TABLE cmsProductViewStatistic
(
ProductViewStatistic bigint not null primary key identity(1,1),
ProductCode nvarchar(250),
ProductId int,
UserId int,
LocationCode nvarchar(128),
IP nvarchar(128),
ViewDate datetime
)